<!DOCTYPE html>
<html>
    <head>
        <script src="vue.js"></script>
    </head>
    <body>
        <div id="app">
           <p>{{msg}}</p>
           <button v-on:click="showinfo">请单击</button>
        </div>
            <script>
                var vm = new Vue({
                    el: '#app',
                    data: {
                        msg: '请单击查看内容'
                    },
                    methods: {
                        showinfo () {
                            this.msg = 'v-on'
                        }
                    }
                });
            </script>
        </div>
    </body>
</html>